#ifndef USER_APPS_H
#define USER_APPS_H

#include "stm8s_gpio.h"

#define _nop_() asm("nop")

#define WS2812_EN_PORT GPIOC
#define WS2812_EN_PIN GPIO_PIN_4

#define USER_KEY_PORT GPIOD
#define USER_KEY_PIN GPIO_PIN_6


#define WS2812_EN_PIN_H() GPIOC->ODR |= (uint8_t)GPIO_PIN_4;
#define WS2812_EN_PIN_L() GPIOC->ODR &= (uint8_t)(~GPIO_PIN_4);

#define USER_KEY_PIN_H() GPIOD->ODR |= (uint8_t)GPIO_PIN_6;

void sys_init(void);
void DelayInit(void);
void DelayMs(uint16_t ms);

#endif